//
//  MyViewController.m
//  Final
//
//  Created by lanou3g on 15/12/2.
//  Copyright © 2015年 皮比诺. All rights reserved.
//

#import "MyViewController.h"
#import "AVOSCloud.h"
#import "ScreenViewController.h"
#import "currentState.h"
@interface MyViewController ()

@end

@implementation MyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   self.navigationItem.title = @"收藏";
    self.view.backgroundColor = [UIColor whiteColor];
    if ([currentState defaultState].isLoading == YES) {
        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"登录" style:(UIBarButtonItemStylePlain) target:self action:@selector(loginaction:)];
        
    }else
    {
         self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"注销" style:(UIBarButtonItemStylePlain) target:self action:@selector(logoutaction:)];
    }
    
}
- (void)logoutaction:(id)sender
{
    
    
}
- (void)loginaction:(id)sender
{
    ScreenViewController * scree = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"screenVC"];
    
    [self showViewController:scree sender:nil];
 
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
